package com.key.puzzlemodel.transverselongitudinal

import android.graphics.Bitmap
import android.graphics.Color
import androidx.lifecycle.MutableLiveData
import com.key.puzzlemodel.bean.HVPuzzleBean
import com.key.puzzlemodel.mvvm.BaseMVVMViewModel

/**
 *
 * @功能描述:
 * @创建时间:     2022/1/4
 * @创建者:       阳
 * @修改时间:     2022/1/4
 * @修改者:       阳
 */
class TransverseLongitudinalMVVMViewModel : BaseMVVMViewModel() {

    //图片列表
    var photoList: ArrayList<HVPuzzleBean> = ArrayList()

    // 菜单编辑 fragment
    val MENUTYPE = 0

    // 边框 fragment
    val BORDERTYPE = 1

    // 编辑 fragment
    val EDITTYPE = 2

    // 背景 fragment
    val BACKGROUNDTYPE = 3


    //横纵向标识,仅用于切换列表的横纵向显示
    var isVertical: Boolean = true

    //是否是编辑状态，用于界面是编辑状态时，界面的逻辑处理
    var isUpdate: MutableLiveData<Boolean> = MutableLiveData()

    // 列表滑动时，当前显示的位置
    var scrollIndex = -1

    //内边距
    var borderInsideNumber = 0

    //外边距
    var borderOutsideNumber = 0

    //圆角
    var borderRoundNumber = 0

    //图片的宽，高
    var imgWidth: Float = 270f
    var imgHeight: Float = 180f

    //外侧边距
    var tabBorderOutside: Float = 0f


    //背景颜色
    var backgroundColor: Int = Color.parseColor("#FFFFFFFF")

    //背景颜色选中效果
    var backgroundItemIndex = -1

    //保存的图片数据
    var saveListObserver: MutableLiveData<ArrayList<Bitmap>> = MutableLiveData()

    //保存的图片数据
    var bitmapCacheList: ArrayList<Bitmap> = ArrayList()


}